package com.example.vm.handler;

import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;

import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashSet;

public class HashSetTypeHandler extends BaseTypeHandler<HashSet<String>> {
    @Override
    public void setNonNullParameter(PreparedStatement ps, int i, HashSet<String> parameter, JdbcType jdbcType) throws SQLException {
        // 实现序列化逻辑
    }

    @Override
    public HashSet<String> getNullableResult(ResultSet rs, String columnName) throws SQLException {
        // 实现反序列化逻辑
        return null;
    }

    @Override
    public HashSet<String> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
        // 实现反序列化逻辑
        return null;
    }

    @Override
    public HashSet<String> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
        // 实现反序列化逻辑
        return null;
    }
}
